import {ADD_TO_CARCOUNT, ADD_TO_CARNEW} from './mutations-type'

export default {
  /*修改数据*/
  updIsLoadShow(state, isShow) {
    state.isLoading = isShow;
  },
  [ADD_TO_CARCOUNT](state, payload) {
    payload.product.count += payload.oldproduct.count;
  },
  [ADD_TO_CARNEW](state, oldproduct) {
    oldproduct.checked = false;
    state.cartList.push(oldproduct);
  },
  update(state, info) {
    state.info.name = info
  }
}
